package com.bdqn.boot.yuanshen.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @Author 周宏锦
 * @Description 关注表的数据访问层
 * @Date 2025/4/1 8:36
 * @Version 1.0
 */
@Mapper
public interface FollowsMapper {
    @Select("SELECT COUNT(*) FROM follows WHERE followed_id = #{userId}")
    Integer getFollowerCount(Integer userId);

    @Select("SELECT COUNT(*) FROM follows WHERE follower_id = #{userId}")
    Integer getFollowedCount(Integer userId);
}